import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import installElementPlus from './plugins/element'
import './assets/css/global.css'
import './assets/font/iconfont.css'


// Vue.use(VueResource);
// Vue.config.productionTip = false

import axios from "axios";
//项目根目录

axios.defaults.baseURL='http://127.0.0.1:8888/api/private/v1/'
axios.interceptors.request.use(config=>{
    console.log(config)
    config.headers.Authorization = window.sessionStorage.getItem('token')
    return config
})

const app = createApp(App)
installElementPlus(app)
app.use(store).use(router).mount('#app')


// app.prototype.$http = axios
app.$http=axios;